<template>
  <div class="ml-myChart">
    <div :style="styles" id="myChart" ></div>
  </div>
</template>

<script type="text/babel">
  export default {
    name:'myEchart', 
    data() {
      return {
        msg: 'Welcome to Your Vue.js App'
      };
	},
	mounted() {
		setTimeout(() => {
			this.drawLine();
		},500)
		
	},
    methods: {
      drawLine(){
          // 基于准备好的dom，初始化echarts实例
          let myChart = this.$echarts.init(document.getElementById('myChart'))
          // 绘制图表
          myChart.setOption(this.options);
      }
    }
  }
</script>

<style scoped rel="stylesheet/less" lang="less">
.ml-myChart {
	text-align: center;
	display: inline-block;
	margin-left:15vw;
	width:500px;
}
</style>
